public class Person {
    private String name;
    private int age;
    private int sex;

    public Person(String name, int age, int sex) {
        this.name = name;
        this.age = age;
        this.sex = sex;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public int getSex() {
        return sex;
    }

    public void setSex(int sex) {
        this.sex = sex;
    }

    public void study() {
        System.out.println("studying");
    }

    public void showAge() {
        System.out.println(this.age);
    }

    public void addAge(int i) {
        this.age =this.age + i;
    }

    public static void main(String[] args) {
        Person p=new Person("tom",20,0);
        p.study();
        p.addAge(2);
        p.showAge();


    }
}
